﻿
@{
    ICE.Vacations.DataBase.SQLDataClass sql = new ICE.Vacations.DataBase.SQLDataClass();
    // sql.OpenConnection();
    sql.OpenConnection();
    System.Data.SqlClient.SqlDataReader read = sql.SQLRead(@User.Identity.Name.ToString().Split('\\')[1]);
    //
    ICE.Vacations.Request.Documents doc = new ICE.Vacations.Request.Documents();
    doc = doc.convertRequestObject(read);
   
    if (doc.tipo.Equals("Aprobador"))
    {
        ViewBag.Title = "Aprobador";
        Layout = "~/Views/Shared/_LayoutAprovee.cshtml";
    }
    else
    {
        ViewBag.Title = "Empleado";
        Layout = "~/Views/Shared/_LayoutICE.cshtml";
    }
    sql.CloseConnection();

  @*  ICE.Vacations.Request.Request request = new ICE.Vacations.Request.Request();

    request.SavePDF(doc); *@
    }




<h2>Bienvenido @{
  
    }</h2>
@*



<form action=@Url.Action("About", "Home", "Home") method="POST">
    Usuario: @Html.TextBox("txtUser",doc.username)
    Cédula: @Html.TextBox("txtEmployeeID",doc.employeeID)
    Primer Apellido: @Html.TextBox("txtApellido1",doc.apellido1)
    Segundo Apellido: @Html.TextBox("txtApellido2",doc.apellido2)
    Nombre: @Html.TextBox("txtemployeeName",doc.employeeName)
    Código Centro funcional: @Html.TextBox("txtcodCF") @Html.TextBox("txtcodDireccion")
    Fecha: @Html.TextBox("txtDate",@DateTime.Now.ToString("dd/MM/yyyy"))
    Fecha Inicio: @Html.TextBox("txtDateFrom")
    Fecha Fin: @Html.TextBox("txtDateTo")
    <input type="submit" value="Guardar"/>
</form>*@



